<template>
  <div class="uicom">
    <ul>
        <li v-for="item in linkArr" :key="item.path">
            <router-link :to="item.path">{{item.title}}</router-link>
        </li>
    </ul>

    <main>
        <router-view/>
    </main>
  </div>
</template>

<script setup>

const linkArr = [
    {path:'/elementplus/buttoncom',title:'按钮组件'},
    {path:'/elementplus/menuscom',title:'菜单组件'},
    {path:'/elementplus/tablecom',title:'表格组件'},
    {path:'/elementplus/formcom',title:'表单组件'},
]
</script>

<style scoped>
.uicom{
    width: 100%;
    height: 90vh;
    overflow: hidden;
    display: flex;
}
.uicom ul{
    width: 200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-content: center;
}
.uicom ul li{
    width: 100%;
    line-height: 60px;
    text-align: center;
}
.uicom ul li a{
    width: 100%;
    height: 100%;
    display: block;
    color: #666;
}
.uicom ul li a.router-link-active{
    color: rgb(3, 182,93);
    font-weight: 800;
    text-decoration: underline;
}
.uicom main{
    flex: 1;
    height: 100%;
    border-left: 1px solid gray;
    margin-left: 10px;
}

</style>